
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[spPlate_InsertPlate]') AND type in (N'P', N'PC'))
	DROP PROCEDURE [dbo].[spPlate_InsertPlate]
GO

GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Eric Liew
-- Create date: 6/2/2009
-- Description:	Insert a Plate
-- =============================================
CREATE PROCEDURE [dbo].[spPlate_InsertPlate]
{
	@PlateId Int32(4),
	@PlateNumber AnsiString(10),
	@OwnerId Int32(4),
	@PlateTypeId Int32(4),

}
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

	INSERT Plate
	(
		PlateId,
		PlateNumber,
		OwnerId,
		PlateTypeId,
	)
	VALUES
	(
		@PlateId,
		@PlateNumber,
		@OwnerId,
		@PlateTypeId,
	) 	

	SELECT @@IDENTITY 
	

 

END
GO
